package foliotracker;

/**
 * Represents a service which allows retrieval of stock prices.
 */
public interface IStockPriceService
{
	/**
	 * Gets the current price for the specified stock symbol.
	 * 
	 * @param symbol The stock symbol to get the price for, e.g. MSFT.
	 * @return The current price of the stock.
	 * @throws UnknownStockSymbolException The stock symbol was not recognised by the service.
	 * @throws StockPriceServiceException There was an error contacting the service.
	 */
	double getStockPrice(String symbol) throws UnknownStockSymbolException, StockPriceServiceException;
	
	/**
	 * Gets the full name for the specified stock symbol.
	 * 
	 * @param symbol The stock symbol to get the price for, e.g. MSFT.
	 * @return The full name of the stock.
	 * @throws UnknownStockSymbolException The stock symbol was not recognised by the service.
	 * @throws StockPriceServiceException There was an error contacting the service.
	 */
	String getStockName(String symbol) throws UnknownStockSymbolException, StockPriceServiceException;
}
